package com.zjcloud.jwgl.domain;

import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zjcloud.common.annotation.Excel;
import com.zjcloud.common.core.domain.BaseEntity;

/**
 * 排课任务对象 sc_schedule_task
 * 
 * @author zjcloud
 * @date 2024-12-19
 */
public class ScScheduleTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 任务ID */
    private Long id;

    /** 任务编码 */
    @Excel(name = "任务编码")
    private String taskCode;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 学期ID */
    @Excel(name = "学期ID")
    private Long semesterId;

    /** 学期名称 */
    @Excel(name = "学期名称")
    private String semesterName;

    /** 约束模板ID */
    @Excel(name = "约束模板ID")
    private Long templateId;

    /** 约束模板名称 */
    @Excel(name = "约束模板名称")
    private String templateName;

    /** 排课算法(GENETIC遗传算法 SIMULATED_ANNEALING模拟退火 TABU_SEARCH禁忌搜索 GREEDY贪心算法) */
    @Excel(name = "排课算法", readConverterExp = "GENETIC=遗传算法,SIMULATED_ANNEALING=模拟退火,TABU_SEARCH=禁忌搜索,GREEDY=贪心算法")
    private String algorithm;

    /** 算法参数配置 */
    @Excel(name = "算法参数配置")
    private String algorithmConfig;

    /** 任务类型(FULL全量排课 INCREMENTAL增量排课 ADJUSTMENT调整排课) */
    @Excel(name = "任务类型", readConverterExp = "FULL=全量排课,INCREMENTAL=增量排课,ADJUSTMENT=调整排课")
    private String taskType;

    /** 任务状态(PENDING待执行 RUNNING执行中 SUCCESS成功 FAILED失败 CANCELLED已取消) */
    @Excel(name = "任务状态", readConverterExp = "PENDING=待执行,RUNNING=执行中,SUCCESS=成功,FAILED=失败,CANCELLED=已取消")
    private String taskStatus;

    /** 优先级(1-10) */
    @Excel(name = "优先级")
    private Integer priority;

    /** 计划开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date scheduledStartTime;

    /** 实际开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualStartTime;

    /** 实际结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualEndTime;

    /** 执行时长(秒) */
    @Excel(name = "执行时长")
    private Long executionDuration;

    /** 总课程数 */
    @Excel(name = "总课程数")
    private Integer totalCourses;

    /** 已排课程数 */
    @Excel(name = "已排课程数")
    private Integer scheduledCourses;

    /** 未排课程数 */
    @Excel(name = "未排课程数")
    private Integer unscheduledCourses;

    /** 冲突数量 */
    @Excel(name = "冲突数量")
    private Integer conflictCount;

    /** 约束违反数量 */
    @Excel(name = "约束违反数量")
    private Integer violationCount;

    /** 排课成功率 */
    @Excel(name = "排课成功率")
    private BigDecimal successRate;

    /** 质量评分 */
    @Excel(name = "质量评分")
    private BigDecimal qualityScore;

    /** 满意度评分 */
    @Excel(name = "满意度评分")
    private BigDecimal satisfactionScore;

    /** 执行日志 */
    @Excel(name = "执行日志")
    private String executionLog;

    /** 错误信息 */
    @Excel(name = "错误信息")
    private String errorMessage;

    /** 结果摘要 */
    @Excel(name = "结果摘要")
    private String resultSummary;

    /** 执行人 */
    @Excel(name = "执行人")
    private String executor;

    /** 是否自动执行(1是 0否) */
    @Excel(name = "是否自动执行", readConverterExp = "1=是,0=否")
    private String isAutomatic;

    /** 重试次数 */
    @Excel(name = "重试次数")
    private Integer retryCount;

    /** 最大重试次数 */
    @Excel(name = "最大重试次数")
    private Integer maxRetries;

    /** 状态(1有效 0无效) */
    @Excel(name = "状态", readConverterExp = "1=有效,0=无效")
    private String status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTaskCode(String taskCode) 
    {
        this.taskCode = taskCode;
    }

    public String getTaskCode() 
    {
        return taskCode;
    }
    public void setTaskName(String taskName) 
    {
        this.taskName = taskName;
    }

    public String getTaskName() 
    {
        return taskName;
    }
    public void setSemesterId(Long semesterId) 
    {
        this.semesterId = semesterId;
    }

    public Long getSemesterId() 
    {
        return semesterId;
    }
    public void setSemesterName(String semesterName) 
    {
        this.semesterName = semesterName;
    }

    public String getSemesterName() 
    {
        return semesterName;
    }
    public void setTemplateId(Long templateId) 
    {
        this.templateId = templateId;
    }

    public Long getTemplateId() 
    {
        return templateId;
    }
    public void setTemplateName(String templateName) 
    {
        this.templateName = templateName;
    }

    public String getTemplateName() 
    {
        return templateName;
    }
    public void setAlgorithm(String algorithm) 
    {
        this.algorithm = algorithm;
    }

    public String getAlgorithm() 
    {
        return algorithm;
    }
    public void setAlgorithmConfig(String algorithmConfig) 
    {
        this.algorithmConfig = algorithmConfig;
    }

    public String getAlgorithmConfig() 
    {
        return algorithmConfig;
    }
    public void setTaskType(String taskType) 
    {
        this.taskType = taskType;
    }

    public String getTaskType() 
    {
        return taskType;
    }
    public void setTaskStatus(String taskStatus) 
    {
        this.taskStatus = taskStatus;
    }

    public String getTaskStatus() 
    {
        return taskStatus;
    }
    public void setPriority(Integer priority) 
    {
        this.priority = priority;
    }

    public Integer getPriority() 
    {
        return priority;
    }
    public void setScheduledStartTime(Date scheduledStartTime) 
    {
        this.scheduledStartTime = scheduledStartTime;
    }

    public Date getScheduledStartTime() 
    {
        return scheduledStartTime;
    }
    public void setActualStartTime(Date actualStartTime) 
    {
        this.actualStartTime = actualStartTime;
    }

    public Date getActualStartTime() 
    {
        return actualStartTime;
    }
    public void setActualEndTime(Date actualEndTime) 
    {
        this.actualEndTime = actualEndTime;
    }

    public Date getActualEndTime() 
    {
        return actualEndTime;
    }
    public void setExecutionDuration(Long executionDuration) 
    {
        this.executionDuration = executionDuration;
    }

    public Long getExecutionDuration() 
    {
        return executionDuration;
    }
    public void setTotalCourses(Integer totalCourses) 
    {
        this.totalCourses = totalCourses;
    }

    public Integer getTotalCourses() 
    {
        return totalCourses;
    }
    public void setScheduledCourses(Integer scheduledCourses) 
    {
        this.scheduledCourses = scheduledCourses;
    }

    public Integer getScheduledCourses() 
    {
        return scheduledCourses;
    }
    public void setUnscheduledCourses(Integer unscheduledCourses) 
    {
        this.unscheduledCourses = unscheduledCourses;
    }

    public Integer getUnscheduledCourses() 
    {
        return unscheduledCourses;
    }
    public void setConflictCount(Integer conflictCount) 
    {
        this.conflictCount = conflictCount;
    }

    public Integer getConflictCount() 
    {
        return conflictCount;
    }
    public void setViolationCount(Integer violationCount) 
    {
        this.violationCount = violationCount;
    }

    public Integer getViolationCount() 
    {
        return violationCount;
    }
    public void setSuccessRate(BigDecimal successRate) 
    {
        this.successRate = successRate;
    }

    public BigDecimal getSuccessRate() 
    {
        return successRate;
    }
    public void setQualityScore(BigDecimal qualityScore) 
    {
        this.qualityScore = qualityScore;
    }

    public BigDecimal getQualityScore() 
    {
        return qualityScore;
    }
    public void setSatisfactionScore(BigDecimal satisfactionScore) 
    {
        this.satisfactionScore = satisfactionScore;
    }

    public BigDecimal getSatisfactionScore() 
    {
        return satisfactionScore;
    }
    public void setExecutionLog(String executionLog) 
    {
        this.executionLog = executionLog;
    }

    public String getExecutionLog() 
    {
        return executionLog;
    }
    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }
    public void setResultSummary(String resultSummary) 
    {
        this.resultSummary = resultSummary;
    }

    public String getResultSummary() 
    {
        return resultSummary;
    }
    public void setExecutor(String executor) 
    {
        this.executor = executor;
    }

    public String getExecutor() 
    {
        return executor;
    }
    public void setIsAutomatic(String isAutomatic) 
    {
        this.isAutomatic = isAutomatic;
    }

    public String getIsAutomatic() 
    {
        return isAutomatic;
    }
    public void setRetryCount(Integer retryCount) 
    {
        this.retryCount = retryCount;
    }

    public Integer getRetryCount() 
    {
        return retryCount;
    }
    public void setMaxRetries(Integer maxRetries) 
    {
        this.maxRetries = maxRetries;
    }

    public Integer getMaxRetries() 
    {
        return maxRetries;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("taskCode", getTaskCode())
            .append("taskName", getTaskName())
            .append("semesterId", getSemesterId())
            .append("semesterName", getSemesterName())
            .append("templateId", getTemplateId())
            .append("templateName", getTemplateName())
            .append("algorithm", getAlgorithm())
            .append("algorithmConfig", getAlgorithmConfig())
            .append("taskType", getTaskType())
            .append("taskStatus", getTaskStatus())
            .append("priority", getPriority())
            .append("scheduledStartTime", getScheduledStartTime())
            .append("actualStartTime", getActualStartTime())
            .append("actualEndTime", getActualEndTime())
            .append("executionDuration", getExecutionDuration())
            .append("totalCourses", getTotalCourses())
            .append("scheduledCourses", getScheduledCourses())
            .append("unscheduledCourses", getUnscheduledCourses())
            .append("conflictCount", getConflictCount())
            .append("violationCount", getViolationCount())
            .append("successRate", getSuccessRate())
            .append("qualityScore", getQualityScore())
            .append("satisfactionScore", getSatisfactionScore())
            .append("executionLog", getExecutionLog())
            .append("errorMessage", getErrorMessage())
            .append("resultSummary", getResultSummary())
            .append("executor", getExecutor())
            .append("isAutomatic", getIsAutomatic())
            .append("retryCount", getRetryCount())
            .append("maxRetries", getMaxRetries())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}